package com.own.component.springdoc.property;

import com.own.component.springdoc.em.SpringDocShowPolicyEnum;
import com.own.constant.ConstantValue;
import lombok.Data;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

/**
 * SwaggerProperty
 *
 * @author chenxueli
 * @date 2021/4/30 11:41
 */
@Data
@SpringBootConfiguration
@ConfigurationProperties(prefix = SwaggerProperty.PREFIX)
@SuppressWarnings("all")
public class SwaggerProperty {

    public static final String PREFIX = ConstantValue.CONFIG_VALUE_CONTENT + "swagger";

    /**
     * 是否开启swagger
     */
    private Boolean enable = false;

    /**
     * 标题
     */
    private String title;

    /**
     * 描述
     */
    private String description;

    /**
     * 版本信息
     */
    private String version = "alpha-0.1";

    /**
     * 开发者名称
     */
    private String author;

    /**
     * 相关网页
     */
    private String url;

    /**
     * 开发者邮箱
     */
    private String email;

    /**
     * 开源协议
     */
    private String license = "Apache 2.0";

    /**
     * 开源协议网址
     */
    private String licenseUrl = "https://www.apache.org/licenses/LICENSE-2.0.html";

    /**
     * 显示策略
     */
    private SpringDocShowPolicyEnum showPolicy = SpringDocShowPolicyEnum.DEFAULT;

    /**
     * 具体的模块名称
     */
    private List<String> module = new ArrayList<>();

}
